import { Card, message,Table,Progress,RowSelect,Button, Row } from 'antd';
import ProForm, {
  ProFormDateRangePicker,
  ProFormDependency,
  ProFormDigit,
  ProFormRadio,
  ProFormSelect,
  ProFormText,
  ProFormTextArea,
} from '@ant-design/pro-form';
import { useRequest } from 'umi';
import { PageContainer } from '@ant-design/pro-layout';
// import { fakeSubmitForm } from './service';
import styles from './style.less';
import AdvancedSearchForm from './AdvancedSearchForm '
import { Select } from 'antd';
import { PlusOutlined,CloudUploadOutlined } from '@ant-design/icons';


const columns = [
  {
    title: '排名',
    dataIndex: 'key',
    key: 'key',
    render: text => <a>{text}</a>,
  },
  {
    title: '学号',
    dataIndex: 'namen',
    key: 'namen',
    render: text => <a>{text}</a>,
  },
  {
    title: '学生姓名',
    dataIndex: 'namex',
    key: 'name',
    render: text => <a>{text}</a>,
  },
  {
    title: '考试名称',
    dataIndex: 'namek',
    key: 'name',
    render: text => <a>{text}</a>,
  },
  {
    title: '学生班级',
    dataIndex: 'nameb',
    key: 'name',
    render: text => <a>{text}</a>,
  },
  {
    title: '科目',
    dataIndex: 'kemu',
    key: 'kemu',
    render: text => <a>{text}</a>,
  },
  {
    title: '成绩',
    dataIndex: 'name',
    key: 'name',
  },
  {
    title: '班级平均分',
    dataIndex: 'name',
    key: 'name',
  },
  {
    title: '操作',
    key: 'action',
    render: (text, record) => (
      <span>
        <a>查看上次成绩</a>
      </span>
    ),
  },
  // {
  //   title: 'Tags',
  //   key: 'tags',
  //   dataIndex: 'tags',
  //   render: tags => (
  //     <span>
  //       {tags.map(tag => {
  //         let color = tag.length > 5 ? 'geekblue' : 'green';
  //         if (tag === 'loser') {
  //           color = 'volcano';
  //         }
  //         return (
  //           <Tag color={color} key={tag}>
  //             {tag.toUpperCase()}
  //           </Tag>
  //         );
  //       })}
  //     </span>
  //   ),
  // },
];


const data = [
  {
    key: '1',
    name: '96',
    namen: '2020091',
    kemu: '语文',
    namek: '2019期中考试',
    namex: '王学聪',
    nameb: '三年级二班',
  },
  {
    key: '2',
    name: '96',
    namen: '2020091',
    kemu: '语文',
    namek: '2019期中考试',
    namex: '王学聪',
    nameb: '三年级二班',
  },
  {
    key: '3',
    name: '96',
    namen: '2020091',
    kemu: '语文',
    namek: '2019期中考试',
    namex: '王学聪',
    nameb: '三年级二班',
  },
  {
    key: '4',
    name: '96',
    namen: '2020091',
    kemu: '语文',
    namek: '2019期中考试',
    namex: '王学聪',
    nameb: '三年级二班',
  },
];
const BasicForm = () => {
  // const { run } = useRequest(fakeSubmitForm, {
  //   manual: true,
  //   onSuccess: () => {
  //     message.success('提交成功');
  //   },
  // });

  const onFinish = async (values) => {
    run(values);
  };

  return (
    <PageContainer  content=" ">
      <Card bordered={false}>
        <AdvancedSearchForm />
      </Card>
      <Card bordered={false}>
        {/* <Row>
          <Button type="primary" icon={<PlusOutlined />}  style={{ margin: 8 }}>
            新增
          </Button>
          <Button type="primary" icon={<CloudUploadOutlined />}  style={{ margin: 8 }}>
            导入
          </Button>
        </Row> */}
        <Table columns={columns} dataSource={data} />
      </Card>

    </PageContainer>
  );
};

export default BasicForm;
